package cn.lili.modules.grab.dingdong.res.order;

import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class CreateOrderRequest {

    @ApiModelProperty("手机号")
    private String phone;

    @ApiModelProperty("收货地址")
    private String consignee;

    @ApiModelProperty("省ID")
    private String province;

    @ApiModelProperty("市ID")
    private String city;

    @ApiModelProperty("区/县ID")
    private String area;

    @ApiModelProperty("收件人")
    private String buyer_name;

    @ApiModelProperty("第三方订单号")
    private String trade_no;

    @ApiModelProperty("商品信息")
    private List<Goods> goods;

    @ApiModelProperty("固定值6")
    private String device = "6";

    @ApiModelProperty("子订单Id")
    private String itemTaskId;

    @Data
    public static class Goods {
        @ApiModelProperty("商品信息")
        private String goods_id;

        @ApiModelProperty("商品规格ID")
        private String spec_id;

        @ApiModelProperty("数量")
        private String num;

        @ApiModelProperty("运输方式 2.4接口获取的code")
        private String yf_mode;

        @ApiModelProperty("运费-- 运费计算接口获取 单位：分")
        private String ship_price;

        @ApiModelProperty("总运费-- 运费计算接口获取 单位：分")
        private String total_ship_price;

        @ApiModelProperty("基础运费-- 运费计算接口获取 单位：分")
        private String basic_ship_price;

        @ApiModelProperty("商品单价 （单位：分）")
        private String goods_price;

        @ApiModelProperty("非必须 仓库ID")
        private String ent_id;
    }
}
